package com.ms.game.invitefriend.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.ms.game.invitefriend.bin.InviteCodeType;
import com.xpec.c4.db.model.log.basic.BasicLogModel;

@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
@Table(name = "invite_code_use_record")
public class InviteCodeUseRecordModel extends BasicLogModel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7561001131583715729L;

	/**
	 * game端帳號
	 */
	private String accountId;
	
	/**
	 * 角色Id
	 */
	private String guid;
	
	/**
	 * 邀請碼
	 */
	private String inviteCode;
	
	/**
	 * 邀請碼類型
	 */
	private InviteCodeType type;
		
	/**
	 * 邀請碼的orderId
	 */
	private String groupId;
	
	/**
	 * 平台帳號
	 */
	private String openId;
	
	/**
	 * C幣
	 */
	private Long goldCoin = 0L;
	
	/**
	 * 道具
	 */
	private String itmes;
	
	/**
	 * 角色名稱
	 */
	private String playerName;
	
	@Column(columnDefinition = "VARCHAR(255) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL  COMMENT '遊戲帳號' ")
	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	@Column(columnDefinition = "VARCHAR(255) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL  COMMENT '角色ID' ")
	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	@Column(columnDefinition = "VARCHAR(50) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL  COMMENT '邀請碼' ")
	public String getInviteCode() {
		return inviteCode;
	}

	public void setInviteCode(String inviteCode) {
		this.inviteCode = inviteCode;
	}

	@Column(columnDefinition = "VARCHAR(50) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL  COMMENT '邀請碼groupID' ")
	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	@Enumerated(EnumType.STRING)
	public InviteCodeType getType() {
		return type;
	}

	public void setType(InviteCodeType type) {
		this.type = type;
	}

	@Column(columnDefinition = "VARCHAR(50) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL  COMMENT '平台帳號' ")
	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}
	
	public Long getGoldCoin() {
		return goldCoin;
	}

	public void setGoldCoin(Long goldCoin) {
		this.goldCoin = goldCoin;
	}

	@Column(columnDefinition = "VARCHAR(255) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL  COMMENT '道具' ")
	public String getItmes() {
		return itmes;
	}

	public void setItmes(String itmes) {
		this.itmes = itmes;
	}

	@Column(columnDefinition = "VARCHAR(50) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL  COMMENT '角色暱稱+後四碼' ")
	public String getPlayerName() {
		return playerName;
	}

	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}
}
